<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>自定义指令</title>
</head>

<body>
  <div id="root">
    <div v-aa="{set:cc}">你好世界</div>
    <DIV>{{ title }}</DIV>
  </div>
  <script src="./js/vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#root',
      data: {
        color: 'red',
        title: 'aa'
      },
      directives: {
        aa(el, binds) {
          binds.value.set('000000000000000000')
        }
      },
      methods: {
        cc(p) {
          this.title = p
        }
      },
    })
  </script>
</body>

</html>